customers=["liuimn","lyvi","wzq;"]
customers.append("fhxrl;")
print(customers)
customers=["Liiumn"]
#customers.lower()
print(customers)
#那么也就是说，变量有这两个方法，并且首字母的话，是根据空格来解释，
#列表的话没有lower和upper这两个方法，并且列表的是修改了，但是变量不会参与方法修改
#true
liuimn="boy"
if liuimn=='boy':
	print("yes, he is a boy.")
grynbi="girl"
if grynbi!="boy":
	print("no,she is not a boy.")
my_food="noodles"
print("is my_food=='noodles'? maybe true!")
print(my_food=='noodles')
fhxrl="male"
print('is fhxrl=="male"? i predict true.')
print(fhxrl=="male")
horse="red horse"
print('is horse=="red horse"? may be true')
print(horse=='red horse')
#false
liuimn='female'
if liuimn=='male':
	print("...")
print(liuimn=='male')
grynbi='man'
if grynbi!='man':
	print("...")
print(grynbi!='man')
my_pet='plant'
print('is my_pet=="cat"? maybe false')
print(my_pet=='cat')
fhxrl='second hand'
print('is fhxrl=="third hand"? maybe false')
print(fhxrl=='third hand')
horse='green'
print("is horse=='red'? may be false")
print(horse=='red')
a="baby"
b="baBy"
c="babies"
print((a.lower())==(b.lower()))
print((a.lower())!=(b.lower()))
print(b==c)
print(a==b)
x=45
print(x==45)
print(x<66)
print(x>66)
print(x<=66)
print(x>=66)
print(x!=45)
place0='shenzhen'
place1='xiamen'
#是否等于才能进行判断
print(place0 == 'shenzhen' and place1 == 'xiamen')
print(place0 == 'xian' or place1 == 'xiamen')
print(place0 == 'suzhou' or place1 == 'guilin')
kitchen=['spoon','sink','mashroom']
print('bowl' in kitchen)
print('sink' in kitchen)
print('bowl' not in kitchen)
age=12
if age<4:
	price=0
elif age<18:
	price=5
else:
	price=10
print('your admission cost is' +str(price)+'.')
#5-3
#判断是否是，变量不是列表。。。
alian_color='red'
if alian_color == 'green':
	print('you have got 5 points.')
alian_color='green'
if alian_color == 'green':
	print('you have got 5 points.')
#5-4
alian_color='red'
if alian_color == 'green':
	print('you have got 5 points.')
if alian_color != 'green':
	print('you have got 10 points.')
if alian_color == 'green':
	print('you have got 5 points.')
else:
	print('you have got 10 points.')
#5-5
if alian_color == 'green':
	print('you have got 5 points.')
elif alian_color == 'yellow':
	print('you have got 10 points.')
else:
	print('you have got 15 points.')
#5-6
age=31
if age < 2:
	print("she is a baby.")
elif age < 4:
	print("she can just walk.")
elif age < 13:
	print("she is a child.")
elif age < 20:
	print("she is a young person.")
elif age < 65:
	print("she is an adult.")
else:
	print("she is a lady.")
#5-7
favourite_food=['apple','pear','berry']
if 'apple' in favourite_food:
	print('i really like apple.')
if 'pear' in favourite_food:
	print("i really like pear.")
if 'banana' in favourite_food:
	print("i really like banana.")
if 'qiwi' not in favourite_food:
	print("i really don't like qiwi.")
#5-8
users=['eric','loise','admin','micky','jack']
for user in users:
	if user == 'admin':
	    print("hello admin,would you like to see a status report?")
	else:
	    print("hello"+user.title()+"thank you fo logging in again.")
#5-9
users1=['eric','loise','admin','micky','jack']
#指定删除元素是方括号，不是圆括号；
del users[0]
del users[0]
del users[0]
del users[0]
del users[0]
print(users)
#这个有点难理解，列表为空，思路就是一定要区分开，有和没有，”有“可以这么表示——
if users:
	for user in users:
	    print(user)
else:
	print("we need to find some users.")
#5-10
current_users=['a','b','c','d','e']
new_users=['f','g','h','c','A']
for new_user in new_users:
	if new_user.lower()in current_users:
	    print("this name has been used.")
	else:
	    print("good job.")
#5-11
#制表符和空格真是要老命了，可是明明都选择了，还是不一样
#打印整数的时候，记得修改格式，字符串
nums=[1,2,3,4,5,6,7,8,9]
for num in nums:
    if num == 1:
        print("\n"+str(num)+"st")
    elif num == 2:
        print("\n"+str(num)+"nd")
    elif num == 3:
        print("\n"+str(num)+"rd")
    else:
        print("\n"+str(num)+"th")
	
	

